package com.iwhalecloud.uncc.common;

/**
 * <Description>
 *
 * @author Lijia
 * @version 1.0
 * @className
 * @createDate 2020/11/10 17:32
 * @copyrightNotice Copyright © 2003 - 2020 Whale Cloud Corporation, All Rights Reserved.
 */
public enum HangingRuleTypeEnum {
    RuleIndexPortZTE(0),
    RuleOltPonCompound(1),
    RulePonInfo(2),
    RuleOnuCompound(3);

    private int code;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    HangingRuleTypeEnum(int code){
        this.code=code;
    }

    public static HangingRuleTypeEnum getAlarmMsgType(int code) {
        switch (code) {
            case 0: return RuleIndexPortZTE;
            case 1: return RuleOltPonCompound;
            case 2: return RulePonInfo;
            case 3: return RuleOnuCompound;
            default:return null;
        }
    }
}
